package com.educhains.module.user.service.impl;

import com.educhains.module.user.persist.mybatis.UserWalletMapper;
import com.educhains.module.user.service.UserWalletService;
import com.educhains.module.user.vo.UserWallet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author YuRun
 * @since 2017年9月1日
 */
@Service
public class UserWalletServiceImpl implements UserWalletService {

    @Autowired
    private UserWalletMapper userWalletMapper = null;

    public UserWallet getUserWalletByUserId(String userId) {
        return userWalletMapper.getUserWalletByUserId(userId);
    }

    public List<UserWallet> getWalletByUserId(String userId) {
        return this.userWalletMapper.getWalletByUserId(userId);
    }

    public int insert(UserWallet record) {
        return this.userWalletMapper.insert(record);
    }

    public int deleteUserWalletById(String userId) {
        return this.userWalletMapper.deleteUserWalletById(userId);
    }

}
